﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using UnityEngine;

public class FightInfoVo
{
    public int pos;

    public int type;

    public string configID;

    public string name;

    public int lv;

    public int hp;

    public int mor;

    public int maxHp;

    public int maxMp;

    public int dead;

    public string skill;

    public string clothemodel;

    public string totalspeed;

    public FightInfoVo(XmlAttributeCollection fightInfoXml)
    {

        pos = int.Parse(fightInfoXml["pos"].Value);
        type = int.Parse(fightInfoXml["type"].Value);
        configID = fightInfoXml["configID"].Value;
		if(type == (int)GameDefine.GameObjectType.GAMEOBJECT_PLAYER){
			name = fightInfoXml["name"].Value;
		} else {
			name = BinaryReaderTool.getInstance().getSwfLangStr(fightInfoXml["name"].Value);
		}
        lv = int.Parse(fightInfoXml["lv"].Value);
        hp = int.Parse(fightInfoXml["hp"].Value);
        mor = int.Parse(fightInfoXml["mor"].Value);
        maxHp = int.Parse(fightInfoXml["maxhp"].Value);
        maxMp = 100;
        dead = 0;
        skill = fightInfoXml["skillID"].Value;
    }


}